package test.service.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import test.service.bean.UserAddress;
import test.service.inter.OrderService;

import java.util.List;

/**
 * @author fhq
 * @date 2020/1/13 10:38
 */
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping("/initOrder")
    public List<UserAddress> initOrder(@RequestParam("userId") String userId) {
        return orderService.initOrder(userId);
    }
}
